<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title> <#include "/jspgou_sys/head.html"/>
<script type="text/javascript">
	function getTableForm() {
		return document.getElementById('tableForm');
	}
	function optDelete() {
		if (Pn.checkedCount('ids') <= 0) {
			alert("<@s.m 'error.checkRecord'/>");
			return;
		}
		if (!confirm("<@s.m 'global.confirm.delete'/>")) {
			return;
		}
		var f = getTableForm();
		f.action = "o_delete.do";
		f.submit();
	}
</script>
</head>
<body>
	<div class="body-box">
		<form action="../consumertop/refer.do" method="post">
			<div class="rhead">
				<div class="rpos"><@s.m "global.position"/>: 消费排行 - <@s.m
					"global.list"/></div>
				<div class="clear"></div>
				起始时间： <input class="Wdate" type="text" style="width: 150px"
					onclick="WdatePicker({maxDate:'#F{$dp.$D(\'endTime\')}',dateFmt:'yyyy-MM-dd'})"
					value="" name="startTime" realvalue="" id="startTime" /> 结束日期： <input
					class="Wdate" type="text" style="width: 150px"
					onclick="WdatePicker({minDate:'#F{$dp.$D(\'startTime\')}',dateFmt:'yyyy-MM-dd'})"
					value="" name="endTime" id="endTime" /> <input type="submit"
					value="确定" />
			</div>
		</form>

		<form id="tableForm" method="post">
			<input type="hidden" name="pageNo" value="${pageNo!}" />
			<table cellspacing="1" cellpadding="0" border="0" class="pn-ltable"
				width="100%">
				<thead class="pn-lthead">
					<tr>
						<th>Id</th>
						<th>用户名</th>
						<th>电子邮箱</th>
						<th>消费金额</th>
					</tr>
				</thead>
				<#list pagination.list as member> <#list userTotals?keys as key>
				<#if key=="${member.id}">
				<tbody class="pn-ltbody">
					<tr>
						<td align="center">${member.id}</td>
						<td align="center">${member.username!}</td>
						<td align="center">${member.email!}</td>
						<td align="center">${userTotals[key]}</td>
					</tr>
				</tbody>
				</#if> </#list> </#list>
			</table>
			<table width="100%" border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td align="center" class="pn-sp">共 ${pagination.totalCount}
						条&nbsp; 每页 ${pagination.pageSize} 条&nbsp; <input type="button"
						value="首 页" onclick="_gotoPage('1');" [#if
						pagination.firstPage] disabled="disabled" [/#if]/> <input
						type="button" value="上一页"
						onclick="_gotoPage('${pagination.prePage}');" [#if
						pagination.firstPage] disabled="disabled" [/#if]/> <input
						type="button" value="下一页"
						onclick="_gotoPage('${pagination.nextPage}');" [#if
						pagination.lastPage] disabled="disabled" [/#if]/> <input
						type="button" value="尾 页"
						onclick="_gotoPage('${pagination.totalPage}');" [#if
						pagination.lastPage] disabled="disabled" [/#if]/>&nbsp; 当前
						${pagination.pageNo}/${pagination.totalPage} 页 &nbsp;转到第<input
						type="text" id="_goPs" style="width: 50px"
						onfocus="this.select();"
						onkeypress="if(event.keyCode==13){$('#_goPage').click();return false;}" />页
						<input id="_goPage" type="button" value="转"
						onclick="_gotoPage($('#_goPs').val());" [#if
						pagination.totalPage==1] disabled="disabled" [/#if]/>
					</td>
				</tr>
			</table>
			<script type="text/javascript">
				function _gotoPage(pageNo) {
					try {
						var tableForm = document.getElementById("tableForm");
						$("input[name=pageNo]").val(pageNo);
						tableForm.action = "${base}/consumertop/v_list.do";
						tableForm.onsubmit = null;
						tableForm.submit();
					} catch (e) {
						alert('_gotoPage(pageNo)方法出错');
					}
				}
			</script>

		</form>
	</div>
	<#include "/common/alert_message.html"/>
</body>
</html>